package repo

import "go-weixin/app/usercenter/model"

type RoleRepo interface {
	RoleAdd(name string, weight int64, parentId int64, role *model.RoleModel) (int64, error)
	RoleExistByName(name string) (bool, error)
	RoleUpdate(id int64, role *model.RoleModel) (int64, error)
	RoleGet(id int64, role *model.RoleModel) (bool, error)
	RoleExistById(id int64) (bool, error)
	RoleUpdateExisByName(name string, id int64) (bool, error)
	RoleAddPowerExist(roleId int64, powerId int64) (bool, error)
	RoleAddPower(roleId int64, powerId int64) (int64, error)
	RoleUpdatePower(roleId int64, oldPowerId int64, newPowerId int64) (int64, error)
	RoleUpdatePowerExiste(roleId int64, newPowerId int64) (bool, error)
	RoleList(limit int64, offset int64, roleList *[]model.RoleModel) error
	GetRoleById(id int64, role *model.RoleModel) (bool, error)
	RoleGetPowerById(id int64, powerList *[]model.PowerModel) error
	RoleGetUserById(id int64, userList *[]model.UserModel) error
}
